resource "google_firestore_document" "<%= ctx[:primary_resource_id] %>" {
  project     = "<%= ctx[:test_env_vars]['project_id'] %>"
  collection  = "somenewcollection"
  document_id = "my-doc-%{random_suffix}"
  fields      = "{\"something\":{\"mapValue\":{\"fields\":{\"akey\":{\"stringValue\":\"avalue\"}}}}}"
}

resource "google_firestore_document" "sub_document" {
  project     = "<%= ctx[:test_env_vars]['project_id'] %>"
  collection  = "${google_firestore_document.<%= ctx[:primary_resource_id] %>.path}/subdocs"
  document_id = "bitcoinkey"
  fields      = "{\"something\":{\"mapValue\":{\"fields\":{\"ayo\":{\"stringValue\":\"val2\"}}}}}"
}

resource "google_firestore_document" "sub_sub_document" {
  project     = "<%= ctx[:test_env_vars]['project_id'] %>"
  collection  = "${google_firestore_document.sub_document.path}/subsubdocs"
  document_id = "asecret"
  fields      = "{\"something\":{\"mapValue\":{\"fields\":{\"secret\":{\"stringValue\":\"hithere\"}}}}}"
}
